how to count number of the triangles in the given figure